refactor(agent-runtime): own prompt cache and registry facts#1036
Merged
limityan merged 1 commit intoJun 2, 2026
Merged
Conversation
c5535ed to
5c34b03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
关联 #970。PR-A 的目标是迁移无 IO、无副作用、可通过 contract tests 证明等价的 Agent Runtime SDK owner 事实,同时保留 core 旧路径兼容。
变更内容
bitfun-agent-runtime::prompt_cache。SubAgentSource、source kind / presentation rank 迁入bitfun-agent-runtime::agents。bitfun-core保留 prompt cache、agent mode module、registry DTO 的旧路径 re-export;session persistence、cold restore、agent definition loading、custom subagent IO、scheduler lifecycle、event delivery、permission handler 继续留在 core。check-core-boundaries,防止 prompt cache、shared mode profile/context、mode/source presentation、SubAgentSourceowner 定义回流到 core。功能与边界影响
Toolhandler、custom subagent file IO。bitfun-agent-runtime依赖仍保持轻量:bitfun-runtime-ports、dashmap、serde、serde_json。验证
node scripts/check-core-boundaries.mjspnpm run check:repo-hygienecargo test -p bitfun-agent-runtime -- --nocapturecargo test -p bitfun-core agentic::agents -- --nocapturecargo test -p bitfun-core prompt_cache -- --nocapturecargo check -p bitfun-core --features product-full